<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta charset="UTF-8">
  <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
  <meta name="Keywords" content="{$SEO['keyword']}" />
  <meta name="Description" content="{$SEO['description']}" />
  <meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
  <meta name="format-detection" content="telephone=no,email=no,adress=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />  
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <link rel="stylesheet" href="{THEME_PATH}styles/swiper.min.css">
  <link rel="stylesheet" href="{THEME_PATH}styles/reset.css">
  <link rel="stylesheet" href="{THEME_PATH}styles/common.css">
  <link rel="stylesheet" href="{THEME_PATH}styles/style.css"> 
<script type="text/javascript" src="{THEME_PATH}js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="{THEME_PATH}js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">
// var ajaxagencyurl ="";
// var obj_title="{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}";
// var obj_right="";
// var obj_rightlink="javascript:void(0);";
</script>
</head>
<body>
  <!-- S 用户信息 -->
  <div class="my_user_info">
    <ul class="flex">
      <li class="userImg" id="header_file"><img src="<?php echo get_avatar($this->userinfo['ico']); ?>" alt="" width="66" class="img-responsive">        <input type="hidden" />
        <input type="file" id="file_up" name="上传" style="display:none;"/></li>
      <li>
        <dl>
          <dt class="name"><?php echo $this->userinfo['username']?></dt>
          <dd class="level">会员LV.<?php echo $this->userinfo['user_type']?></dd>
        </dl>
      </li>
    </ul>
  </div>
  <!-- E 用户信息 -->
  <div class="my_content">
    <div class="flex my_top_nav bgWhite">
      <dl>
        <a href="/index.php?m=user&c=order&a=miner">
          <dt><img src="{THEME_PATH}images/i1.png" alt="" width="40" class="icon"></dt>
          <dd>云矿机</dd>
        </a>
      </dl>
      <dl>
        <a href="/index.php?m=user&c=trade&a=tradelog">
          <dt><img src="{THEME_PATH}images/i2.png" alt="" width="40" class="icon"></dt>
          <dd>交易</dd>
        </a>
      </dl>
      <dl>
        <a href="index.php?m=user&c=coupons&a=income">
          <dt><img src="{THEME_PATH}images/i3.png" alt="" width="40" class="icon"></dt>
          <dd>账单</dd>
        </a>
      </dl>
    </div>
    <div class="flex flex-pack-justify bgWhite my_dbt_earnings">
      <dl>
        <dt class="bold">DBT</dt>
        <dd class="red font24"><?php echo $this->userinfo['user_money'];?></dd>
      </dl>
      <dl>
        <dt class="font12">昨日收益</dt>
        <dd class="val">{$yday_points}</dd>
      </dl>
    </div>
    <div class="flex bgWhite my_dbt_art">
      <dl>
        <dt class="num1"><?php echo $this->userinfo['freeze_money'];?></dt>
        <dd>冻结</dd>
      </dl>
      <dl>
        <dt class="num2"><?php echo $trade_count;?></dt>
        <dd>交易</dd>
      </dl>
      <dl>
      
        <dd>好评</dd>
      </dl>
    </div>
  </div>
  <div class="my_bot_nav flex row_wrap">
    <dl>
      <a href="/index.php?m=user&c=index&a=invite">
        <dt><img src="{THEME_PATH}images/i4.png" alt="" width="40" class="icon"></dt>
        <dd>招募</dd>
      </a>
    </dl>
    <dl>
      <a href="/index.php?m=user&c=index&a=union">
        <dt><img src="{THEME_PATH}images/i5.png" alt="" width="40" class="icon"></dt>
        <dd>联盟</dd>
      </a>
    </dl>
    <dl>
      <a href="/index.php?m=user&c=user&a=feedback#content">
        <dt><img src="{THEME_PATH}images/i6.png" alt="" width="40" class="icon"></dt>
        <dd>客服</dd>
      </a>
    </dl>
    <dl>
      <a href="/index.php?m=help&c=help&a=index">
        <dt><img src="{THEME_PATH}images/i7.png" alt="" width="40" class="icon"></dt>
        <dd>新手解答</dd>
      </a>
    </dl>
    <dl>
      <a href="/index.php?m=help&c=help&a=about">
      <dt><img src="{THEME_PATH}images/i8.png" alt="" width="40" class="icon"></dt>
      <dd>关于我们</dd>
      </a>
    </dl>
    <dl>
      <a href="/index.php?m=user&c=index&a=setting">
        <dt><img src="{THEME_PATH}images/i9.png" alt="" width="40" class="icon"></dt>
        <dd>设置</dd>
      </a>
    </dl>
  </div>
<link href="/statics/js/webuploader/webuploader.css" rel="stylesheet" />
<script src="/statics/js/webuploader/webuploader.js" type="text/javascript"></script>
<script type="text/javascript">
    var uploader = WebUploader.create({
        auto:true,
        fileVal:'upfile',
        // swf文件路径
        swf: '/statics/js/webuploader/webuploader.swf',
        // 文件接收服务端。
        server: "/index.php?m=attachment&c=upload&a=swfupload",
        // 选择文件的按钮。可选
        formData:{
            "module":"",
            "catid":"",
            "userid":"1",
            "dosubmit":"1",
            "thumb_width":"0",
            "thumb_height":"0",
            "watermark_enable":"1",
            "filetype_post":"jpg|jpeg|gif|bmp|png",
            "swf_auth_key":"57a39f6f7415ec2cdd2b8afd77b57c3f",
            "isadmin":"1"
        },
        // 内部根据当前运行是创建，可能是input元素，也可能是flash.
        pick: {
            id: '#header_file',
            multiple:false
        },
        accept:{
            title: '图片文件',
            extensions: 'gif,jpg,jpeg,bmp,png',
            mimeTypes: 'image/*'
        },
        thumb:{
            width: '110',
            height: '110',
        },
        chunked: false,
        chunkSize:1000000,
        // 不压缩image, 默认如果是jpeg，文件上传前会压缩一把再上传！
        resize: false
    });
    uploader.onUploadSuccess = function( file, response ) {
        var pickid = this.options.pick.id;
        var data = response._raw;
        var arr = data.split(',');
        if(response.url.length > 0) {
            $(pickid).find('img').attr('src', response.url);
            $(pickid).find('input[type=hidden]').eq(0).attr('value', response.url);
        }
        $.post("/index.php?m=user&c=upload&a=upload_user_avatar_wap",{
            img_url : response.url
        },function(data){
            if (data.status == 1) {
                location.reload();
            }else{
                hd_alert(data.info);
                if (data.url) {
                    location.href = data.url;
                    return false;
                }
                location.reload();
            }
        },'json')
    }
    uploader.onUploadError = function(file, reason) {
        hd_alert('文件上传错误：' + reason);
    }
</script>
{template footer}
